package com.lippeng.taohua.db.domain;

import java.util.List;

import com.lippeng.taohua.db.page.Page;
import com.lippeng.taohua.db.page.PageParam;

/**
 * This is the Super Domain of all Extend Domain.
 * 
 * Here,I provide some DML methods
 * 
 * @author lippeng
 * 
 */
public class SuperDomain extends PageParam {

	private static final long serialVersionUID = 1L;

	// Primary Key
	protected Long id;

	// The Proxy Object
	private IDomain proxyDomain;

	public SuperDomain() {
		proxyDomain = ProxyDomain.getProxyDomain(this);
	}

	public Boolean executeUpdate(String sqlString) {
		return proxyDomain.executeUpdate(sqlString);
	}

	public List<? extends SuperDomain> executeQuery(String sqlString) {
		return proxyDomain.executeQuery(sqlString);
	}

	/**
	 * Insert the current Domain
	 * 
	 * @param None
	 * @return
	 */
	public Boolean insert() {
		return proxyDomain.insert();
	}

	/**
	 * Delete the current Domain
	 * 
	 * @param None
	 * @return
	 */

	public Boolean delete() {

		return proxyDomain.delete();
	}

	/**
	 * Update the current Domain
	 * 
	 * @param None
	 * @return
	 */
	public Boolean update() {

		return proxyDomain.update();
	}

	/**
	 * Update the current Domain and before ,you should load the Domain First
	 * 
	 * @param None
	 * @return
	 */
	public Boolean updateNull() {

		return proxyDomain.updateNull();
	}

	/**
	 * Load the current Domain by ID
	 * 
	 * You could not receive it unless you want
	 * 
	 * @return
	 */
	public SuperDomain load() {

		return proxyDomain.load();
	}

	/**
	 * Count the number of the Domains by the condition
	 * 
	 * @return
	 */
	public Long count() {

		return proxyDomain.count();
	}

	/**
	 * Check the Domain exist or not
	 * 
	 * @return
	 */
	public Boolean exist() {

		return proxyDomain.exist();
	}

	/**
	 * Select Domain List by condition of current Domain
	 * 
	 * @return
	 */
	public List<SuperDomain> select() {

		return proxyDomain.select();
	}

	/**
	 * Select Domain List by condition of current Domain
	 * 
	 * @return
	 */
	public List<SuperDomain> selectEqual() {

		return proxyDomain.selectEqual();
	}

	/**
	 * Select Domain List by condition of current Domain
	 * 
	 * @return
	 */
	public List<SuperDomain> selectPageList(Page page) {

		return proxyDomain.selectPageList(page);
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

}
